import request from '@/utils/request'
import apis from './'

export function getAddQuestion () {
  return request({
    url: apis.AddQuestion,
    method: 'get'
  })
}

export function postAddQuestion (data) {
  return request({
    url: apis.AddQuestion,
    method: 'post',
    data: data
  })
}

export function getQuestionList (parameter) {
  return request({
    url: apis.QuestionList,
    method: 'get',
    params: parameter
  })
}

export function getDetail (id) {
  return request({
    url: `${apis.QuestionDetail}?q_id=${id}`,
    method: 'get'
  })
}

export function addComment (id, data) {
  return request({
    url: `${apis.AddComment}?q_id=${id}`,
    method: 'post',
    data: data
  })
}

export function addLog (id, data) {
  return request({
    url: `${apis.AddLog}?q_id=${id}`,
    method: 'get',
    data: data
  })
}
